home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Fatted Calf
/
The Fatted Calf.iso
/
Applications
/
Games
/
NeXTmille
/
Source
/
StackView.h
< prev
next >
Wrap
Text File
|
1990-12-08
|
2KB
|
56 lines
/* Generated by Interface Builder */
#import "CardHolder.h"
#import "CardView.h"
// This class is used for card holders that stack cards. This
// includes the draw pile, discard pile, the speed and battle piles, and
// the distance piles contained in the distance card stacks object.
@interface StackView:CardHolder
{
// Normally subviews are stacked on top of each other.
// If this flag is set then each subview shows a small amount
// of overlap area.
BOOL overlapModeFlag;
}
+ newFrame:( const NXRect * )frameRect;
// Normally, NO. In that case card subviews are shown directly on top
// of each other (i.e. the lower views are obscured). YES, allows a
// small amount of overlap area to show. Cards that overlap are
// shown on top of the bottom card some small number of units lower
// in the window. The default is NO.
- setOverlap:( BOOL )flag;
// This method adds a card to the top of the stack.
- addCard:( CardView * )aCard :sender;
// This method removes a card from the stack. If it is the top most
// card its subview (usually the next card in the stack) is displayed.
- removeCard:( CardView * )aCard :sender;
// This method returns the card on the top of the stack. It returns nil
// if there isn't any cards in the stack. (The card is not removed
// from the stack.)
- ( CardView * )topCard;
// A private method. When a card is added or deleted from the stack
// the stack is reordered. If the stack is in overlap mode when a
// card is added then the location of the card is adjusted to show
// some overlapping area of the cards beneath it.
// One cute thing about this method, although we'll not be using it, is
// that a card removed from the center of the stack causes the stack
// to be reordered.
- _adjustCards;
// Overrides the superclass methods. They remove a card(s) from the subview
// list and send them to some other object.
- sendCard:( CardView * )aCard to:anObject;
- sendAllCardsTo:anObject;
// A card is visible if the stack isn't an overlapping stack
// and the view isn't the last view.
- ( BOOL )subviewVisible:aView;
@end